/*
 * @Author: 灰佳小白 1150248441@qq.com
 * @Date: 2022-10-12 14:15:27
 * @LastEditors: 灰佳小白 1150248441@qq.com
 * @LastEditTime: 2022-10-12 19:43:29
 * @FilePath: \briup-ui\src\store\modules\column.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { pageQuery } from '@/api/proCategory'
export default {
  namespaced: true,
  state: {
    // 所有栏目数据
    columns: []
  },
  mutations: {
    // 声明栏目突变
    SET_COLUMN(state, payload) {
      state.columns = payload
    }
  },
  actions: {
    // 查询所有栏目 api
    async queryColumns({ commit }, params) {
      const res = await pageQuery(params)
      // console.log(res);
      commit('SET_COLUMN', res.data.list)
    }
  }

}
